/****************************************************************************/
/* NAME:           temperature.h                                            */
/* PURPOSE:        Manage all oscillator                                    */
/* CREATED_BY:     Vyx                                                      */
/* CREATION_DATE:  07/07/2012                                               */
/************************************** (C) Copyright 2012 AquaLink *********/

#include "main.h"
#include "Hal_GenericConfig.h"
#include "stm32f10x.h"
#include "stm32_config.h"

typedef enum
{
    OUTPUT_LINES_AUTO,
    OUTPUT_LINES_FORCED_ON,
    OUTPUT_LINES_FORCED_OFF
}OutputLines_Modes_t;

typedef enum
{
    OUTPUT_LINES_SKIMMER,
    OUTPUT_LINES_HEATER,
    OUTPUT_LINES_PUMP,
    OUTPUT_LINES_NO_ROLES
}OutputLines_Roles_t;

typedef struct
{
    uint8_t             id;                   /* Output ID                                          */
    uint8_t             OutputName;           /* Name of out put                                    */
    uint8_t             time_start_HH;        /* Hours start                                        */
    uint8_t             time_start_MM;        /* Minute start                                       */
    uint8_t             time_stop_HH;         /* Hours stop                                         */
    uint8_t             time_stop_MM;         /* Minute stop                                        */
    bool                logicalLevel;         /* FALSE : Set at low level, TRUE : Set at high level */
    OutputLines_Modes_t mode;                 /* output mode                                        */
    OutputLines_Roles_t role;                 /* output role                                        */
}Output_Line_def_t;

/**
  * @brief  Main function of output lines control.
  * @param  none
  * @retval None
  */
void vTaskCTRL_OUTPUT_LINES();

/**
  * @brief  Read set temp of water sensor
  * @param  None
  * @retval Temp
  */
double Output_getWaterTemp(void);

/**
  * @brief  Read set point of water sensor
  * @param  None
  * @retval Set point
  */
double Output_getWaterSetPoint(void);
